//
//  WBDemoViewController.swift
//  weibo
//
//  Created by wenquan wang on 11/23/16.
//  Copyright © 2016 wenquan wang. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        // set title
        title = "\(navigationController?.childViewControllers.count ?? 0)th View"
    }
    // MARK: - Event
    @objc func showNext(){
        let vc = WBDemoViewController()
        
        navigationController?.pushViewController(vc, animated: true)
    }
}

extension WBDemoViewController{
    override func setupUI() {
        super.setupTableView()
        // set right navBar
        //navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Next", style: .plain, target: self, action: #selector(showNext))
        
        //let btn : UIButton = UIButton.cz_textButton("Next", fontSize: 16, normalColor: UIColor.darkGray, highlightedColor: UIColor.orange)
        //btn.addTarget(self, action: #selector(showNext), for: .touchUpInside)
        
        navItem.rightBarButtonItem = UIBarButtonItem(title: "Next", target: self, action: #selector(showNext))
    }
}
